import { NgModule, ModuleWithProviders } from '@angular/core';
import { DynamicComponentModule } from 'ng-dynamic';
import { DataTableModule, SharedModule } from 'primeng/primeng';

import { CustomComponent, MyNgDynamicComponent } from './ngDynamic.component';
import { NG_ROOT_MODULES } from "../share";
import { PrimeNgTableComponent } from "./primeng.table.component";

const NG_DYNAMIC_COMPONENT_MODULE_BASE: ModuleWithProviders = DynamicComponentModule.forRoot({
    imports: [

    ]
});

const PRIME_NG_ROOT_MODULES = [
    DataTableModule,
    SharedModule
];

@NgModule({
    declarations: [
        CustomComponent,
        MyNgDynamicComponent,
        PrimeNgTableComponent
    ],
    imports: [
        NG_DYNAMIC_COMPONENT_MODULE_BASE,
        NG_ROOT_MODULES,
        PRIME_NG_ROOT_MODULES
    ],
    exports: [
        CustomComponent,
        MyNgDynamicComponent,
        PrimeNgTableComponent,

        NG_ROOT_MODULES,
        PRIME_NG_ROOT_MODULES
    ]
})
export class MyNgDynamicModule {

}
